bedCost.useMonths='12';
bedCost.buckleNumber='24';

function onSubsidizationChange(vmObj) {
	bedCost.subsidization = '';
	bedCost.subsidizationValue = 0;
	
	if(vmObj.data.subsidizationType=='1') {
		bedCost.subsidization = '饭卡补助';
		bedCost.subsidizationValue = vmObj.data.subsidizationMoney;
	}else if(vmObj.data.subsidizationType=='2') {
		bedCost.subsidization = '包餐补助';
		bedCost.subsidizationValue = vmObj.data.subsidizationDay;
	}else {
		bedCost.subsidization = '无补助';
	}
}

vue_vm.$watch("data.subsidizationType",function(newVal,oldVal) {
	onSubsidizationChange(this);
});

vue_vm.$watch("data.subsidizationMoney",function(newVal,oldVal) {
	onSubsidizationChange(this);
});

vue_vm.$watch("data.subsidizationDay",function(newVal,oldVal) {
	onSubsidizationChange(this);
});

vue_vm.$watch("data.consumptionType",function(newVal,oldVal) {
	if(newVal=='1') {
		bedCost.consumptionWay = '半个月扣费';
		bedCost.consDeductionWay = parseFloat((bedCost.price/2).toFixed(2));
	}else if(newVal=='2') {
		bedCost.consumptionWay = '1个月扣费';
		bedCost.consDeductionWay = bedCost.price;
	}
});